package com.woniuxy01;

/**
 * @author 作者
 * @create 2025-07-23 10:38
 */
public class Dog extends Animal {

    private int love;

    public Dog() {
    }
    public Dog(String name, int age,int love) {
        super(name, age);
        this.love = love;
    }

    public int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }

    public String toString(){
//        return "name:"+getName()+".....";
        return super.toString()+" love:"+love;
    }

    @Override
    public void eat() {
        System.out.println("狗啃骨头");
    }

    public void playDisc(){
        System.out.println("dog catch disc");
    }
}
